import request from "@/utils/request";
const BASE_URL = "wblog_user";
export default {
  /**
   * permissions列表
   * @param {*} searchMap
   */
  getList() {
    return request({
      url: `${BASE_URL}/permissions`,
      method: "get"
    });
  },
  /**
   * 通过权限id查询权限信息
   * @param {*} permissionsId
   */
  getById(permissionsId) {
    return request({
      url: `${BASE_URL}/permissions/${permissionsId}`,
      method: "get"
    });
  },
  /**
   * 修改权限信息
   * @param {*} pojo
   */
  update(pojo) {
    return request({
      url: `${BASE_URL}/permissions`,
      method: "put",
      data: pojo
    });
  },
  /**
   * 删除权限
   * @param {*} pid
   */
  delete(pid) {
    return request({
      url: `${BASE_URL}/permissions/${pid}`,
      method: "delete"
    });
  },
 
  /**
   * 添加权限
   * @param {*} pojo
   */
  addPermission(pojo) {
    return request({
      url: `${BASE_URL}/permissions`,
      method: "post",
      data: pojo
    });
  }
};
